package com.whater.common.util;

import java.util.Collection;

public class StringUtils {
	public static boolean isEmpty(Object obj) {
		return isBlank(obj) ;
	}
	public static boolean isBlank(Object obj) {
		if(obj == null) {
			return true ;
		}
		if(obj instanceof String) {
			return obj.toString().trim().equals("");
		}
		if(obj instanceof Collection) {
			return ((Collection)obj).isEmpty();
		}
		return false ;
	}
	public static boolean isNotEmpty(Object obj) {
		return !isEmpty(obj) ;
	}
	
	public static boolean isNotBlank(Object obj) {
		return !isEmpty(obj) ;
	}
}
